package com.ruoyi.law.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.law.mapper.ContentExtendMapper;
import com.ruoyi.law.domain.ContentExtend;
import com.ruoyi.law.service.IContentExtendService;

/**
 * 字段名选项扩展Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-02-25
 */
@Service
public class ContentExtendServiceImpl implements IContentExtendService 
{
    @Autowired
    private ContentExtendMapper contentExtendMapper;

    /**
     * 查询字段名选项扩展
     * 
     * @param extendId 字段名选项扩展主键
     * @return 字段名选项扩展
     */
    @Override
    public ContentExtend selectContentExtendByExtendId(Long extendId)
    {
        return contentExtendMapper.selectContentExtendByExtendId(extendId);
    }

    /**
     * 查询字段名选项扩展列表
     * 
     * @param contentExtend 字段名选项扩展
     * @return 字段名选项扩展
     */
    @Override
    public List<ContentExtend> selectContentExtendList(ContentExtend contentExtend)
    {
        return contentExtendMapper.selectContentExtendList(contentExtend);
    }

    /**
     * 新增字段名选项扩展
     * 
     * @param contentExtend 字段名选项扩展
     * @return 结果
     */
    @Override
    public int insertContentExtend(ContentExtend contentExtend)
    {
        contentExtend.setCreateTime(DateUtils.getNowDate());
        return contentExtendMapper.insertContentExtend(contentExtend);
    }

    /**
     * 修改字段名选项扩展
     * 
     * @param contentExtend 字段名选项扩展
     * @return 结果
     */
    @Override
    public int updateContentExtend(ContentExtend contentExtend)
    {
        contentExtend.setUpdateTime(DateUtils.getNowDate());
        return contentExtendMapper.updateContentExtend(contentExtend);
    }

    /**
     * 批量删除字段名选项扩展
     * 
     * @param extendIds 需要删除的字段名选项扩展主键
     * @return 结果
     */
    @Override
    public int deleteContentExtendByExtendIds(Long[] extendIds)
    {
        return contentExtendMapper.deleteContentExtendByExtendIds(extendIds);
    }

    /**
     * 删除字段名选项扩展信息
     * 
     * @param extendId 字段名选项扩展主键
     * @return 结果
     */
    @Override
    public int deleteContentExtendByExtendId(Long extendId)
    {
        return contentExtendMapper.deleteContentExtendByExtendId(extendId);
    }
}
